#! /usr/bin/env python
# -*- coding: utf-8 -*-

# *************************************************************
#     Filename @  run_user_code.py
#       Author @  Huoty
#  Create date @  2016-04-08 17:30:16
#  Description @  
# *************************************************************

import sys, traceback

def run_user_code(envdir):
    source = raw_input(">>>")
    try:
        exec source in envdir
        print envdir
    except:
        print "Exception in user code:"
        print '-' * 60
        traceback.print_exc(file=sys.stdout)
        print '-' * 60
    

# Script starts from here

envdir = {}
while 1:
    run_user_code(envdir)
